Prepare a simple R package for distributing documented functions
Explain the terms Repository, Dependency, and Namespace
Implement testing in an R package
Collaboratively work on an R package on GitHub
shareable collection of documented code and/or dataImports vs Depends
Package: PackageName
Type: Package
Title: Central Dogma
Version: 0.1.0
Description: simple R package that replicates the central dogma of molecular biology.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports:
ggplot2,
stringr
Depends:
R (>= 4.0)
> ?randomDNA
ℹ Rendering development documentation for "randomDNA"
Error in .get_package_metadata(pkgdir) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
Error in .get_package_metadata(pkgdir) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
> devtools::document()
ℹ Updating cdogma documentation
ℹ Loading cdogma
Warning message:
Skipping NAMESPACE
✖ It already exists and was not generated by roxygen2.
devtools::check()❯ checking examples ... ERROR
Running examples in ‘cdogma-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hello
> ### Title: Hello, World!
> ### Aliases: hello
>
> ### ** Examples
>
> hello()
Error in hello() : could not find function "hello"
Execution halted
@importFrom package function tag to a function description compared to using package::function().They increase the size of our package.
Can introduce compatibility issues.
They are rarely avoidable.
@importFrom package function and @import packagepackage::functionpackage::function…
R for Bio Data Science